home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
018a
/
zip2zi31.zip
/
ZIP2ZIPB.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-05-31
|
3KB
|
104 lines
@Echo off
Rem Zip2zipB.Bat (Called by Zip2zip.Bat)
Rem %1 is STARTING sub dir; D:\SubDir\ With trailing "\"
Rem %2 is DRV:\Path\FileName.Zip furnished by ZIP2ZIP.BAT's Call ZIP2ZIPB %1 %%f
Rem ..Add/Change -options for Strip/Add Comment File, Logo etc.
Call ZIP2-SDE.BAT %1 Z_B
IF "%FSIZE%"=="" GoTo MajorError
IF NOT "%FSIZE%"=="0" GoTo REQ_SD
Echo Zip2ZipB Executing..Working on %2
Set CNZL=
Set FSIZE=
PKUNZIP %2 -t >Nul
IF Errorlevel 1 GoTo Error
PKUNZIP %2 -v | Find "{{Processed By ZIP2ZIP For Max Compression}}" >ZIP2-FSZ.
Call ZIP2-FSZ.BAT
IF "%FSIZE%"=="" GoTo MajorError
IF "%FSIZE%"=="0" GoTo CHK_PTH
Echo %2 Has Been Processed Before With ZIP2ZIP, Skipping.
Echo %2 Has Been Processed Before With ZIP2ZIP, Skipping. >>%1ZIP2ZIP.LOG
GoTo End
:CHK_PTH
Call ZIP2-ZNP.BAT %2
IF "%FSIZE%"=="" GoTo MajorError
IF "%FSIZE%"=="0" GoTo UN_ZIP
Echo %2 FAILED Contains a .ZIP File In It's Path. (B) >>%1ZIP2ZIP.LOG
Echo %2 Failed. See ZIP2ZIP.LOG
GoTo End
:UN_ZIP
PKunZip %2 -d -Jhrs %1Z_B
IF Errorlevel 1 GoTo Error
IF NoT Exist %1Z_B\*.ZIP GoTo RE_ZIP
Rem ==========================================================
DIR %1Z_B\*.ZIP | Find /C " ZIP " >#2DO_B.
For %%f in ( %1Z_B\*.ZIP ) DO Call ZIP2ZIPC.BAT %1 %%f
Rem ==========================================================
IF "%SAFETY%"=="" GoTo End
IF Not Exist %1Z_B\CNZL.FLG GoTo RE_ZIP
SET CNZL=Y
Echo %2 FAILED.. Look For Lower Reason >>%1ZIP2ZIP.LOG
GoTo Done
:RE_ZIP
PKZip %2 -k -mrp -ex -Jhrs -wHS %1Z_B\*.*
IF Errorlevel 1 GoTo Error
Echo {{Processed By ZIP2ZIP For Max Compression}} | PKZIP %2 -k -ex -z
IF Errorlevel 1 GoTo Error
GoTo Skip_Alt_Method
Rem Alt_Method....Edit To Suit
Rem BBS could put their Comment "Add" here. And Change FIND Search Spec above.
:: Echo {{Processed By ZIP2ZIP For Max Compression}} >TMP.CMT
:: PKZip %2 -k -ex -z <TMP.CMT ...or your BBS comment.txt file
:: Del TMP.CMT >Nul
:Skip_Alt_Method
Echo %2 OK >>%1ZIP2ZIP.LOG
Echo %2>>%1ZIP2ZIP.CVT
GoTo Done
:MajorError
Echo Major Logic Error. Do NOT Continue.
Set CNZL=Y
Echo %CNZL% >%1Z_B\CNZL.FLG
IF "%Safety%"=="" GoTo End
Echo Cancel With ^C (Control C)...Or...
Rem Sysops will want to Comment out the Pauses
Pause
Set Safety=
GoTo End
:REQ_SD
Echo Reserved Sub Dir %1Z_B Exists. A prior execution failed to delete it.
Echo This could be a malfunction of the ATTRIB.EXE /S Cmd or something
Echo more serious. This Sub Dir Must NOT Exist At This Point...Canceling
Echo.
IF "%Safety%"=="" GoTo End
Echo Cancel With ^C (Control C)...Or...To Skip The Rest...
Pause
Set Safety=
GoTo End
:Error
Echo %2 Failed.. PKZIP or PKUNZIP Encountered an Error in 1st Lev.>>%1ZIP2ZIP.LOG
Set CNZL=Y
Echo %CNZL% >%1Z_B\CNZL.FLG
:Done
Call ZIP2ZMOP.BAT %1 Z_B Z_B %CNZL%
:End
For %%f IN (#2DO_B. #DONE_B. #AT_B.) DO IF Exist %%f Del %%f >Nul
For %%f IN (#2DO_C. #DONE_C. #AT_C.) DO IF Exist %%f Del %%f >Nul
Set DONE_B=
Set DONE_C=